﻿namespace ACCOUNTING.LVY.Business
{
    using ACCOUNTING;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Data;
    using System.Windows.Forms;

    public class clsThanhToanChiTiet
    {
        private string mKhoa = "";
        private string mKhoaChungTu = "";
        private string mKhoaDoiTuong = "";
        private string mKhoaTaiKhoan = "";
        private string mKhoaThanhToan = "";
        private string mLoaiTien = "";
        private string mNgayChungTu = "";
        private string mSoChungTu = "";
        private double mThanhToan = 0.0;
        private double mThanhToanNT = 0.0;
        private double mTienChietKhau = 0.0;
        private double mTienChietKhauNT = 0.0;
        private double mTienHang = 0.0;
        private double mTienHangNT = 0.0;
        private double mTienThue = 0.0;
        private double mTienThueNT = 0.0;
        private double mTyGia = 0.0;
        private string mVe = "";

        public bool Save()
        {
            bool flag=false;
            IDataParameter[] commandParameters = new IDataParameter[0x12];
            try
            {
                commandParameters[0] = DBHelper.createParameter("@Khoa", DbType.Int64, ParameterDirection.Input, this.mKhoa);
                commandParameters[1] = DBHelper.createParameter("@KhoaTaiKhoan", DbType.Int64, ParameterDirection.Input, this.mKhoaTaiKhoan);
                commandParameters[2] = DBHelper.createParameter("@Ve", DbType.Int64, ParameterDirection.Input, this.mVe);
                commandParameters[3] = DBHelper.createParameter("@KhoaThanhToan", DbType.Int64, ParameterDirection.Input, this.mKhoaThanhToan);
                commandParameters[4] = DBHelper.createParameter("@KhoaDoiTuong", DbType.Int64, ParameterDirection.Input, this.mKhoaDoiTuong);
                commandParameters[5] = DBHelper.createParameter("@KhoaChungTu", DbType.Int64, ParameterDirection.Input, this.mKhoaChungTu);
                commandParameters[6] = DBHelper.createParameter("@SoChungTu", DbType.Int64, ParameterDirection.Input, this.mSoChungTu);
                commandParameters[7] = DBHelper.createParameter("@NgayChungTu", DbType.Int64, ParameterDirection.Input, this.mNgayChungTu);
                commandParameters[8] = DBHelper.createParameter("@LoaiTien", DbType.Int64, ParameterDirection.Input, this.mLoaiTien);
                commandParameters[9] = DBHelper.createParameter("@TyGia", DbType.Date, ParameterDirection.Input, this.mTyGia);
                commandParameters[10] = DBHelper.createParameter("@TienHangNT", DbType.Date, ParameterDirection.Input, this.mTienHangNT);
                commandParameters[11] = DBHelper.createParameter("@TienHang", DbType.Date, ParameterDirection.Input, this.mTienHang);
                commandParameters[12] = DBHelper.createParameter("@TienChietKhauNT", DbType.Date, ParameterDirection.Input, this.mTienChietKhauNT);
                commandParameters[13] = DBHelper.createParameter("@TienChietKhau", DbType.Date, ParameterDirection.Input, this.mTienChietKhau);
                commandParameters[14] = DBHelper.createParameter("@TienThueNT", DbType.Date, ParameterDirection.Input, this.mTienThueNT);
                commandParameters[15] = DBHelper.createParameter("@TienThue", DbType.Date, ParameterDirection.Input, this.mTienThue);
                commandParameters[0x10] = DBHelper.createParameter("@ThanhToanNT", DbType.Date, ParameterDirection.Input, this.mThanhToanNT);
                commandParameters[0x11] = DBHelper.createParameter("@ThanhToan", DbType.Date, ParameterDirection.Input, this.mThanhToan);
                flag = DBHelper.ExecuteNonQuery(modGeneral.ConnectionString, CommandType.StoredProcedure, "BH_sp_ThanhToanChiTiet", commandParameters) > 0;
            }
            catch (Exception exception1)
            {
                ProjectData.SetProjectError(exception1);
                Exception exception = exception1;
                MessageBox.Show(exception.Message.ToString());
                flag = false;
                ProjectData.ClearProjectError();
                return flag;
                ProjectData.ClearProjectError();
            }
            return flag;
        }

        public string Khoa
        {
            get
            {
                return this.mKhoa;
            }
            set
            {
                this.mKhoa = value;
            }
        }

        public string KhoaChungTu
        {
            get
            {
                return this.mKhoaChungTu;
            }
            set
            {
                this.mKhoaChungTu = value;
            }
        }

        public string KhoaDoiTuong
        {
            get
            {
                return this.mKhoaDoiTuong;
            }
            set
            {
                this.mKhoaDoiTuong = value;
            }
        }

        public string KhoaTaiKhoan
        {
            get
            {
                return this.mKhoaTaiKhoan;
            }
            set
            {
                this.mKhoaTaiKhoan = value;
            }
        }

        public string KhoaThanhToan
        {
            get
            {
                return this.mKhoaThanhToan;
            }
            set
            {
                this.mKhoaThanhToan = value;
            }
        }

        public string LoaiTien
        {
            get
            {
                return this.mLoaiTien;
            }
            set
            {
                this.mLoaiTien = value;
            }
        }

        public string NgayChungTu
        {
            get
            {
                return this.mNgayChungTu;
            }
            set
            {
                this.mNgayChungTu = value;
            }
        }

        public string SoChungTu
        {
            get
            {
                return this.mSoChungTu;
            }
            set
            {
                this.mSoChungTu = value;
            }
        }

        public double ThanhToan
        {
            get
            {
                return this.mThanhToan;
            }
            set
            {
                this.mThanhToan = value;
            }
        }

        public double ThanhToanNT
        {
            get
            {
                return this.mThanhToanNT;
            }
            set
            {
                this.mThanhToanNT = value;
            }
        }

        public double TienChietKhau
        {
            get
            {
                return this.mTienChietKhau;
            }
            set
            {
                this.mTienChietKhau = value;
            }
        }

        public double TienChietKhauNT
        {
            get
            {
                return this.mTienChietKhauNT;
            }
            set
            {
                this.mTienChietKhauNT = value;
            }
        }

        public double TienHang
        {
            get
            {
                return this.mTienHang;
            }
            set
            {
                this.mTienHang = value;
            }
        }

        public double TienHangNT
        {
            get
            {
                return this.mTienHangNT;
            }
            set
            {
                this.mTienHangNT = value;
            }
        }

        public double TienThue
        {
            get
            {
                return this.mTienThue;
            }
            set
            {
                this.mTienThue = value;
            }
        }

        public double TienThueNT
        {
            get
            {
                return this.mTienThueNT;
            }
            set
            {
                this.mTienThueNT = value;
            }
        }

        public double TyGia
        {
            get
            {
                return this.mTyGia;
            }
            set
            {
                this.mTyGia = value;
            }
        }

        public string Ve
        {
            get
            {
                return this.mVe;
            }
            set
            {
                this.mVe = value;
            }
        }
    }
}

